const express = require('express');
const app = express();
const bodyParser = require('body-parser');
const cors = require('cors');
const manage = require('./routes/manage/index');
const client = require('./routes/client/index');
const setHeader = require('./common/setHeader');
const context = require('./common/context');

app.use(cors())//解决跨域
app.use(bodyParser.urlencoded({ extended: false }))//解决post参数问题
app.use(setHeader);
app.use(context)


app.use('/manage', manage);//管理后台路由
app.use('/client', client);//展示路由

module.exports = app;